/* ===============================
   Portal Module Cards – Full Style
   Compatible with Vuexy Theme
   =============================== */

/* کارت پایه ماژول */
.module-card {
  height: 100%;
  border: none;
  border-radius: 0.5rem;
  transition: all .25s ease;
  background-color: var(--bs-card-bg, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* افکت Hover برای کارت */
.module-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* محتوای داخلی کارت */
.module-card .card-body {
  width: 100%;
  height: 100%;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* لینک کارت */
.module-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  color: inherit !important;
}

/* آواتار یا دایره آیکن ماژول */
.avatar-initial-box {
  width: 64px;
  height: 64px;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

/* عنوان کارت */
.module-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bs-body-color, #566a7f);
  margin-top: 0.5rem;
  text-align: center;
}

/* ظاهر ماژول هنگام Drag & Drop */
.cursor-move {
  cursor: grab;
  transition: transform 0.15s ease;
}

.cursor-move:active {
  cursor: grabbing;
  transform: scale(0.98);
}

/* حالت‌های SortableJS */
.sortable-ghost {
  opacity: 0.4;
}

.sortable-chosen {
  transform: scale(1.05);
}

.sortable-drag {
  transform: rotate(2deg);
}

/* ترازیت وسط کارت داخل ستون‌های Bootstrap */
.portal-grid .col,
.portal-grid [class*="col-"] {
  display: flex;
  align-items: stretch;
}
/* توضیح زیرماژول‌ها */
.module-desc {
  font-size: 0.75rem;
  color: #a1acb8;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1; /* حداکثر تعداد خط */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 18px; /* ثابت نگه داشتن ارتفاع */
  line-height: 18px;
}
/* ============================================================
   🎨 کلاس‌های رنگ سازگار با حالت Light و Dark
   ============================================================ */

/* 🔵 آبی */
.bg-label-primary {
  background-color: rgba(94, 139, 251, 0.15) !important;
  color: #5e8bfb !important;
}

/* 🟡 زرد */
.bg-label-warning {
  background-color: rgba(249, 168, 37, 0.15) !important;
  color: #f9a825 !important;
}

/* 🟢 سبز */
.bg-label-success {
  background-color: rgba(80, 184, 60, 0.15) !important;
  color: #50b83c !important;
}

/* 🔴 قرمز */
.bg-label-danger {
  background-color: rgba(230, 57, 70, 0.15) !important;
  color: #e63946 !important;
}

/* 🔷 آبی روشن */
.bg-label-info {
  background-color: rgba(0, 188, 212, 0.15) !important;
  color: #00bcd4 !important;
}

/* 🟣 بنفش */
.bg-label-purple {
  background-color: rgba(124, 58, 237, 0.15) !important;
  color: #7c3aed !important;
}

/* 🩷 صورتی */
.bg-label-pink {
  background-color: rgba(216, 27, 96, 0.15) !important;
  color: #d81b60 !important;
}

/* 🟠 نارنجی */
.bg-label-orange {
  background-color: rgba(245, 124, 0, 0.15) !important;
  color: #f57c00 !important;
}

/* ⚫ تیره */
.bg-label-dark {
  background-color: rgba(66, 66, 66, 0.15) !important;
  color: #757575 !important;
}

/* ⚪ طوسی */
.bg-label-secondary {
  background-color: rgba(117, 117, 117, 0.15) !important;
  color: #9e9e9e !important;
}

/* 🟢 فیروزه‌ای */
.bg-label-teal {
  background-color: rgba(0, 105, 92, 0.15) !important;
  color: #00695c !important;
}

/* 🔵 نیلی */
.bg-label-indigo {
  background-color: rgba(63, 81, 181, 0.15) !important;
  color: #3f51b5 !important;
}

/* ============================================================
   🎨 حالت Dark Mode - بهبود کنتراست
   ============================================================ */

[data-theme="dark"] .bg-label-primary {
  background-color: rgba(94, 139, 251, 0.25) !important;
  color: #7c9cfc !important;
}

[data-theme="dark"] .bg-label-warning {
  background-color: rgba(249, 168, 37, 0.25) !important;
  color: #fbbd3e !important;
}

[data-theme="dark"] .bg-label-success {
  background-color: rgba(80, 184, 60, 0.25) !important;
  color: #6dcc5a !important;
}

[data-theme="dark"] .bg-label-danger {
  background-color: rgba(230, 57, 70, 0.25) !important;
  color: #f05a68 !important;
}

[data-theme="dark"] .bg-label-info {
  background-color: rgba(0, 188, 212, 0.25) !important;
  color: #26d6ee !important;
}

[data-theme="dark"] .bg-label-purple {
  background-color: rgba(124, 58, 237, 0.25) !important;
  color: #9d7df5 !important;
}

[data-theme="dark"] .bg-label-pink {
  background-color: rgba(216, 27, 96, 0.25) !important;
  color: #ec407a !important;
}

[data-theme="dark"] .bg-label-orange {
  background-color: rgba(245, 124, 0, 0.25) !important;
  color: #ffa726 !important;
}

[data-theme="dark"] .bg-label-dark {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #bdbdbd !important;
}

[data-theme="dark"] .bg-label-secondary {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #bdbdbd !important;
}

[data-theme="dark"] .bg-label-teal {
  background-color: rgba(0, 105, 92, 0.25) !important;
  color: #26a69a !important;
}

[data-theme="dark"] .bg-label-indigo {
  background-color: rgba(63, 81, 181, 0.25) !important;
  color: #7986cb !important;
}

