/* ارتفاع تقریبی نوار بالا (navbar) */
:root {
  --nx-navbar-height: 48px;
}

/* صفحه‌هایی که سرویس‌های فاندامنتال دارند */
.fundamental-page {
  /* اگر در base.css padding-top ندادی، این خط کمک می‌کند محتوا زیر navbar قایم نشه */
  /* padding-top: calc(var(--nx-navbar-height) + 0.5rem); */
}

/* باکس اسکرول برای جداول بزرگ: ارتفاع داینامیک متناسب با اندازه صفحه */
.fundamental-page .dynamic-table-area {
  max-height: calc(100vh - var(--nx-navbar-height) - 90px);
  overflow-y: auto;
}

/* لپ‌تاپ و تبلت: چون هدر چند خطی‌تر می‌شود، کمی ارتفاع جدول را کم می‌کنیم */
@media (max-width: 992px) {
  .fundamental-page .dynamic-table-area {
    max-height: calc(100vh - var(--nx-navbar-height) - 120px);
  }
}

/* موبایل: هدر و تب‌ها فضای بیشتری می‌گیرند → جدول کم‌ارتفاع‌تر شود */
@media (max-width: 576px) {
  .fundamental-page .dynamic-table-area {
    max-height: calc(100vh - var(--nx-navbar-height) - 160px);
  }
}

/* اسکرول‌بار نرم و ظریف برای جدول‌ها */
.fundamental-page .dynamic-table-area::-webkit-scrollbar {
  width: 6px;
}
.fundamental-page .dynamic-table-area::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 10px;
}
.fundamental-page .dynamic-table-area::-webkit-scrollbar-track {
  background: #f1f5f9;
}

/* ردیف عنوان ستون‌ها همیشه در بالای جدول بماند */
table thead th {
    position: sticky;
    top: 0;
    z-index: 4;           /* بالاتر از سلول‌های معمولی */
}

/* بک‌گراند ردیف عنوان ستون‌ها */
table thead th,
table thead td {
    background: #f8f7fc !important;
}
/* smart_signal.css */
.custom-tabs {
  display: flex;
  flex-wrap: wrap; /* در صفحه‌های کوچک، تب‌ها بروند زیر هم */
  gap: 0.5rem;
  justify-content: center;
  padding: 0.5rem;
}
.custom-tab {
  flex: 1 1 110px; /* مقدار پیشنهادی پایه‌ی طول تب است */
  max-width: 140px;
  font-size: .75rem;
  font-weight: 200;
  text-align: center;
  background-color: white;
  color: #00036d;
  padding: .3rem .2rem;  /* ↓ ارتفاع را کم کردیم */
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* برای صفحه‌های کوچکتر از 768px */
@media (max-width: 768px) {
  .custom-tab {
    flex: 1 1 80px;
    max-width: 100px;
    font-size: 10px;
    padding: 0.3rem 0.2rem;  /* ↓ حتی کوتاه‌تر در تبلت */
  }
}

/* برای موبایل کوچکتر از 480px */
@media (max-width: 480px) {
  .custom-tab {
    flex: 0 0 auto;
    min-width: 100px;
    padding: 0.3rem 0.2rem;  /* ↓ کوتاه در موبایل */
  }
}

  .custom-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }


.custom-tab:hover {
  background-color: #e9f3ff;
}

.custom-tab.active {
  background-color: #0d6efd;
  color: white;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* تنظیمات عمومی برای کارت‌ها */
.card-header {
    background-color: #f8f9fa;
    font-weight: bold;
}

.card-body {
    padding: 0;
}
/* تنظیمات کلی */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    direction: rtl;
}

table {
    border-collapse: separate; /* برای جلوگیری از مشکل با sticky */
    border-spacing: 0;
    font-size: 12px;
}
/* هاور روی سطر */
table tbody tr:hover > td,
table tbody tr:hover > th {
    background-color: #eff2f5 !important;
}
/* جدول */
table th,
table td {
    white-space: nowrap;
    vertical-align: middle;
    background: #fff;            /* بک گراند پیش فرض */
    transition: background 0.2s;
    min-width: 175px;
}

/* ستون اول (شرح) فیکس شود */
table th.sticky-col,
table td.sticky-col {
    position: sticky;
    right: 0; /* چون راست به چپ هست، باید از right استفاده شود */
    z-index: 2;
    text-align: right;
    direction: rtl;
}
/* تنظیم متن چندخطی برای ستون شرح */
table td.sticky-col {
    max-width: 150px;
    font-size: 12px;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* بالاتر بردن header */
table thead th.sticky-col {
    z-index: 5;
}
/* فونت و ارتفاع  ستون‌های تایتل */
table thead th{
font-size: 12px;
line-height: 1.7;
}
/* بک‌گراند  ستون‌های تایتل */
table thead th,
table thead td {
    background-color: #f8f7fc !important ;
    color: #1e293b;
}
/* تنظیم ارتفاع رکوردهای جدول و نازکتر کردن بوردها */
table tbody td {
    border-bottom: 1px solid rgba(229, 231, 235, 0.7);  /* نازک و کمرنگ */
    height: 2.6rem;
}
.table-border {
    border: 1px solid #f1f1f1;   /* خطوط معمولی */
}

.table {
    font-size: 12px;
    margin-bottom: 0;
}


/* برای موبایل */
@media (max-width: 576px) {
    .table th, .table td {
        font-size: 12px;
    }

    .card-header h6 {
        font-size: 14px;
    }

    .table-responsive {
        font-size: 12px;
    }
}
.responsive-title {
    background-color: #d6e5fe;
    text-align: right;
    font-weight: bold;
    font-size: 11px; /* پیش‌فرض برای موبایل */
    padding: 0.5rem 1rem;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.responsive-title span {
    color: #00036d;
    font-weight: bold;
    font-size: 12px;
}

@media (min-width: 768px) {
    .responsive-title {
        font-size: 12px;
    }

.responsive-title span {
        font-size: 14px;
    }
}

/* کارت معرفی */
.intro-card {
  position: relative;
  background: linear-gradient(90deg, #0d6efd, #2563eb);
  color: white;
  padding: 1.1rem 1.4rem;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

/* دکمه بستن */
.intro-close-btn {
  position: absolute;
  top: 8px;
  left: 10px;
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  font-size: 1.3rem;
  font-weight: bold;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s;
}

.intro-close-btn:hover {
  background: rgba(255,255,255,0.3);
}

.intro-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.intro-text {
  font-size: 0.9rem;
  line-height: 1.8;
  margin: 0;
}

@media (max-width: 576px) {
  .intro-card {
    padding: 0.9rem 1.1rem;
  }
  .intro-title {
    font-size: 1rem;
  }
  .intro-text {
    font-size: 0.85rem;
  }
  .intro-close-btn {
    top: 5px;
    left: 8px;
    font-size: 1.2rem;
  }
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}