/* Generated by script */
@font-face {
  font-family: Vazirmatn RD FD NL;
  src: url("assets/fonts/Vazirmatn-RD-FD-NL-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn RD FD NL;
  src: url("assets/fonts/Vazirmatn-RD-FD-NL-ExtraLight.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn RD FD NL;
  src: url("assets/fonts/Vazirmatn-RD-FD-NL-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn RD FD NL;
  src: url("assets/fonts/Vazirmatn-RD-FD-NL-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn RD FD NL;
  src: url("assets/fonts/Vazirmatn-RD-FD-NL-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn RD FD NL;
  src: url("assets/fonts/Vazirmatn-RD-FD-NL-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn RD FD NL;
  src: url("assets/fonts/Vazirmatn-RD-FD-NL-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn RD FD NL;
  src: url("assets/fonts/Vazirmatn-RD-FD-NL-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn RD FD NL;
  src: url("assets/fonts/Vazirmatn-RD-FD-NL-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* غیرفعال کردن اعداد لاتین در صورت وجود فونت پیش‌فرض */
* {
  font-feature-settings: "lnum" 0; /* غیرفعال کردن اعداد لاتین */
  font-variant-numeric: normal; /* جلوگیری از تغییر اعداد به لاتین */
}

body {
  font-family: "Vazirmatn RD FD NL";
  background-color: #f8f9fa;
  margin: 0;
  padding-top: 60px; /* فاصله برای هدر ثابت */
  unicode-range: U+06F0-06F9;
}

input,
select,
textarea,
table,
th,
td,
.dataTable,
.navbar-text {
  font-family: "Vazirmatn RD FD NL" !important;
}

h5 {
  color: #690974; /* رنگ بنفش برای عناوین */
}

.dataTables_wrapper,
.dataTable th,
.dataTable td {
  font-family: "Vazirmatn RD FD NL" !important;
}

/* استایل نوار بالا */
.navbar {
  background-color: #e7eedb; /* تم سبز روشن */
  border-bottom: 1px solid #dee2e6;
  z-index: 1000;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
}

.navbar-text {
  color: #690974; /* رنگ تاریخ */
}

/* دکمه همبرگر */
.navbar-toggler {
  border: 1px solid #690974;
  color: #690974;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(105, 9, 116, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* منوی کناری (Offcanvas) */
.offcanvas {
  width: auto; /* عرض خودکار بر اساس محتوا */
  max-width: 300px; /* حداکثر عرض برای جلوگیری از خیلی باز شدن */
  background-color: #e7eedb; /* تم سبز روشن */
}

.offcanvas-header {
  background-color: #e7eedb;
  border-bottom: 1px solid #dee2e6;
}

.offcanvas-title {
  color: #690974;
  font-weight: 600;
}

.offcanvas-body {
  overflow-y: auto; /* اسکرول عمودی */
  padding: 1rem; /* فقط 1rem پدینگ */
}

.offcanvas .nav-link {
  color: #333;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  text-decoration: none;
  border-radius: 5px;
}

.offcanvas .nav-link:hover,
.offcanvas .nav-link:focus,
.offcanvas .nav-link.active {
  color: #690974;
  background-color: #ddd;
}

.offcanvas .nav-link i {
  margin-left: 10px;
  width: 20px;
  text-align: center;
}

.offcanvas .nav-link span {
  display: inline-block;
  white-space: nowrap;
}

/* جداکننده‌ها */
.sidebar-divider {
  margin: 10px 0;
  border-top: 1px solid #ccc;
}

/* زیرمنوها */
.list-unstyled {
  padding-right: 20px;
}

/* محتوای اصلی */
.main-content {
  padding: 20px;
}

/* جداول */
.table-work-details thead tr th,
.table-work-details tbody tr td {
  white-space: nowrap !important;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}

.responsive-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  min-width: 800px; /* حداقل عرض برای اسکرول افقی */
}

.responsive-table th,
.responsive-table td {
  padding: 8px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.responsive-table th {
  background-color: #f8f9fa;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* تنظیم عرض ستون‌ها */
.responsive-table th:nth-child(1),
.responsive-table td:nth-child(1) {
  width: 60px; /* شناسه */
}

.responsive-table th:nth-child(2),
.responsive-table td:nth-child(2) {
  width: 200px; /* نام محصول */
}

.responsive-table th:nth-child(3),
.responsive-table td:nth-child(3) {
  width: 120px; /* قیمت واحد */
}

.responsive-table th:nth-child(4),
.responsive-table td:nth-child(4) {
  width: 150px; /* عملیات یا موجودی */
}

.responsive-table th:nth-child(5),
.responsive-table td:nth-child(5) {
  width: 100px; /* موجودی */
}

.responsive-table th:nth-child(6),
.responsive-table td:nth-child(6) {
  width: 100px; /* تغییرات */
}

/* استایل DataTables */
.dataTables_wrapper {
  width: 100%;
  overflow-x: auto;
}

.dataTable th,
.dataTable td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center !important;
  vertical-align: middle !important;
}

#productsTable {
  table-layout: fixed;
  width: 100%;
}

.btn-sm {
  margin: 0 2px;
  display: inline-block;
}

/* مودال‌ها */
.modal {
  z-index: 1055;
}

/* سایر المان‌ها */
.card {
  background-color: #f8f9fa;
  margin-bottom: 20px;
}

canvas {
  max-height: 300px;
}

select {
  width: fit-content !important;
}

.select-wdt {
  width: fit-content !important;
}

.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
}

.list-group-item {
  width: 100%;
}

.table-container {
  overflow-x: auto;
  overflow-y: auto;
}
.table-inventory {
  width: 100%;
  border-collapse: collapse;
}
.table-inventory th,
.table-inventory td {
  vertical-align: middle;
  white-space: nowrap;
  padding: 10px;
  text-align: center;
}
/* .dataTables_paginate .paginate_button {
  padding: 0.5em 1em;
} */
/* .dataTables_length {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 10px;
} */
/* .dataTables_paginate {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 10px;
} */

.table-responsive {
  overflow-x: auto;
  width: 100%;
}
.table-responsive table {
  min-width: 800px;
  table-layout: fixed;
}
th {
  white-space: normal;
  word-break: break-word;
  /* حذف text-overflow: ellipsis */
}
.dataTables_paginate {
  width: 100%;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
}
.dataTables_paginate .pagination {
  margin: 0;
  padding: 0;
}
.dataTables_paginate .pagination .page-item {
  margin: 0;
  padding: 0;
  display: inline-block;
}
.dataTables_paginate .pagination .page-link {
  margin: 0;
  padding: 0.25rem 0.5rem;
  border: none;
  border-right: 1px solid #dee2e6;
}
.dataTables_paginate .pagination .page-item:last-child .page-link {
  border-right: none;
}

/* تنظیمات موبایل */
@media (max-width: 600px) {
  body {
    padding-top: 56px; /* تنظیم برای هدر در موبایل */
  }

  .main-content {
    padding: 15px;
  }

  .responsive-table {
    min-width: 600px;
  }

  .responsive-table th,
  .responsive-table td {
    font-size: 14px;
    padding: 6px;
  }

  .offcanvas {
    max-width: 250px; /* حداکثر عرض در موبایل */
  }
}
