/* استایل‌های اصلی جدول */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  direction: rtl;
}

.table thead {
  background-color: #27d0d5;
}

.table thead th {
  color: #ffffff;
  font-weight: bold;
  padding: 15px;
  text-align: right;
  font-family: 'IRANSansXV', sans-serif;
  font-size: 15px;
  border: none;
  position: relative;
}

.table tbody tr {
  transition: background-color 0.3s;
}

.table tbody tr:nth-child(odd) {
  background-color: rgba(242, 252, 253, 0.7);
}

.table tbody tr:hover {
  background-color: rgba(39, 208, 213, 0.1);
}

.table td {
  font-family: 'IRANSansXV', sans-serif;
  font-size: 14px;
  text-align: right;
  color: #333;
  padding: 12px 15px;
  border-top: 1px solid #eee;
  vertical-align: middle;
}

/* استایل‌های DataTables */
.dataTables_wrapper {
  font-family: 'IRANSans', sans-serif;
  direction: rtl;
  text-align: right;
  margin-bottom: 30px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  margin: 15px 0;
}

.dataTables_wrapper .dataTables_filter {
  text-align: left;
}

.dataTables_wrapper .dataTables_filter input {
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 8px 12px;
  background-color: #fff;
  color: #333;
  font-size: 14px;
  width: 250px;
  transition: all 0.3s;
  margin-right: 10px;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: #27d0d5;
  box-shadow: 0 0 8px rgba(39, 208, 213, 0.4);
  outline: none;
}

.dataTables_wrapper .dataTables_length select {
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 8px 30px 8px 12px;
  background-color: #fff;
  color: #333;
  font-size: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8.825L1.763 4.5 6 0.175 10.237 4.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  transition: all 0.3s;
}

.dataTables_wrapper .dataTables_length select:focus {
  border-color: #27d0d5;
  box-shadow: 0 0 8px rgba(39, 208, 213, 0.4);
  outline: none;
}

.dataTables_wrapper .dataTables_info {
  font-size: 14px;
  color: #666;
  padding: 10px 0;
}

/* استایل‌های صفحه‌بندی */
.dataTables_wrapper .dataTables_paginate {
  text-align: center;
  padding-top: 15px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 8px 15px;
  margin: 0 4px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #fff;
  color: #333 !important;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background-color: #27d0d5;
  border-color: #27d0d5;
  color: #fff !important;
  font-weight: bold;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current) {
  background-color: #f0f8f8;
  border-color: #27d0d5;
  color: #27d0d5 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* استایل‌های برای نمایش اعداد مثبت و منفی */
.text-success, .positive {
  color: #28a745 !important;
  font-weight: bold;
}

.text-danger, .negative {
  color: #dc3545 !important;
  font-weight: bold;
}

/* استایل‌های واکنش‌گرا */
@media (max-width: 992px) {
  .table thead th, .table td {
    padding: 10px;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 180px;
  }
}

@media (max-width: 768px) {
  .table thead th, .table td {
    padding: 8px;
    font-size: 13px;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 150px;
  }

  .dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px;
    margin: 0 2px;
    font-size: 12px;
  }
}

@media (max-width: 576px) {
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_length {
    text-align: center;
    float: none;
    display: block;
    margin-bottom: 15px;
  }

  .dataTables_wrapper .dataTables_filter input {
    margin-right: 0;
    margin-top: 5px;
    width: 100%;
  }
}