/* استایل‌های عمومی */
body {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  background-color: #f4f7f6;
  font-size: 14px;
}

/* 1. نوار ناوبری سبز */
.main-navbar {
  background-color: #198754;
  border-bottom: 4px solid #0f5132;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* استایل منوی کشویی */
.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  transition: all 0.3s;
}

.nav-link:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
  border: none;
  border-radius: 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 0;
  min-width: 220px;
}

.dropdown-item {
  padding: 8px 20px;
  border-bottom: 1px solid #f1f1f1;
  font-size: 0.9rem;
  color: #333;
}

.dropdown-item:hover {
  background-color: #e9ecef;
  color: #198754;
}

.dropdown-item i {
  margin-left: 8px;
  width: 20px;
  text-align: center;
  color: #666;
}

/* لووی بیضی آبی */
.blue-oval-logo {
  background-color: #0056b3;
  color: white;
  padding: 8px 25px;
  border-radius: 50px;
  display: inline-block;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  font-size: 1rem;
  margin-right: 20px;
}

/* کانتینر محتوا */
.main-container {
  margin-top: 15px;
}

/* استایل کارت‌ها */
.card {
  border: 1px solid #dee2e6;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.card-header {
  background-color: #fff;
  border-bottom: 2px solid #e9ecef;
  padding: 8px 15px;
}
.card-title {
  margin: 0;
  font-weight: bold;
  color: #495057;
  border-right: 4px solid #198754;
  padding-right: 10px;
  font-size: 0.95rem;
}

/* تنظیمات ردیف‌ها */
.mb-2-custom {
  margin-bottom: 8px;
}

/* مدیریت صفحات */
.page-section {
  display: none;
  animation: fadeIn 0.3s;
}
.page-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* فوتر */
footer {
  margin-top: 30px;
  background: #212529;
  color: #adb5bd;
}
.btn-xs {
  padding: 0.2rem 0.4rem;
  font-size: 0.75rem;
  line-height: 1.2;
  border-radius: 0.2rem;
}

/* استایل برای فیلدهای جستجو */
.search-input {
  position: relative;
}

.search-input-field {
  padding-right: 40px;
}

.search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  z-index: 10;
}

/* استایل برای وضعیت */
.status-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  white-space: nowrap;
  display: inline-block;
}

.status-success {
  background-color: #198754;
  color: #fff;
}

.status-warning {
  background-color: #ffc107;
  color: #000;
}

.status-danger {
  background-color: #dc3545;
  color: #fff;
}

.status-info {
  background-color: #0dcaf0;
  color: #000;
}

/* استایل برای جدول - جلوگیری از اسکرول افقی */
.table-responsive {
  overflow-x: auto;
  max-width: 100%;
}

.compact-table {
  width: 100%;
  min-width: 1800px;
}

.compact-table th,
.compact-table td {
  padding: 0.3rem 0.4rem;
  font-size: 0.85rem;
  white-space: nowrap;
  vertical-align: middle;
}

/* استایل برای ستون‌ها با عرض ثابت */
.col-row {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
}

.col-action {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.col-delete {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}

.col-order {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.col-date {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.col-status {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.col-good {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.col-origin {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.col-destination {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}

.col-value {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.col-freight {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.col-total-freight {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.col-packaging {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}

.col-national {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.col-driver {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

.col-plate {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

.col-smart {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.col-postal {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.col-sender {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.col-receiver {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.col-bill {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}

/* استایل کلی برای جلوگیری از اسکرول‌های ناخواسته */
body {
  overflow-x: hidden;
  max-width: 100vw;
  font-family: Vazirmatn, sans-serif;
}

.main-container {
  max-width: 100%;
  overflow-x: hidden;
}

/* استایل برای کارت */
.card-header-bg {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

/* استایل برای select2 */
.select2-container {
  width: 100% !important;
}

/* استایل برای صفحه‌بندی */
.pagination-sm .page-link {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* استایل برای فیلدهای تاریخ */
.date-field {
  position: relative;
}

.date-field .form-control {
  padding-right: 40px;
}

.date-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  z-index: 10;
}

/* استایل برای اعداد */
.number-cell {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  direction: ltr;
  text-align: left;
}

.currency {
  color: #6c757d;
  font-size: 0.75rem;
}

/* استایل برای highlight */
.highlight-row {
  background-color: rgba(13, 202, 240, 0.1) !important;
}

/* استایل برای جدول در موبایل */
@media (max-width: 768px) {
  .compact-table {
    min-width: 1700px;
  }

  .compact-table th,
  .compact-table td {
    padding: 0.25rem 0.3rem;
    font-size: 0.8rem;
  }

  .col-destination {
    width: 130px;
    min-width: 130px;
    max-width: 130px;
  }

  .col-value {
    width: 110px;
    min-width: 110px;
    max-width: 110px;
  }
}

/* استایل برای loading */
#loadingmessage {
  height: 20px;
  float: left;
  display: none;
}
.btn-micro {
  padding: 0.15rem 0.35rem;
  font-size: 0.7rem;
  line-height: 1.2;
  border-radius: 0.2rem;
  margin: 0 1px;
}

.btn-micro i {
  font-size: 0.7rem;
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-group-micro {
  gap: 1px;
}

.badge-status {
  padding: 0.2rem 0.4rem;
  font-size: 0.7rem;
  font-weight: normal;
}

.btn-danger-small {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 0.15rem 0.35rem;
  border-radius: 0.2rem;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.btn-danger-small:hover {
  background-color: #c82333;
  color: white;
}
.btn-micro {
  padding: 0.15rem 0.35rem;
  font-size: 0.7rem;
  line-height: 1.2;
  border-radius: 0.2rem;
  margin: 0 1px;
}

.btn-micro i {
  font-size: 0.7rem;
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-group-micro {
  gap: 1px;
}

/* استایل برای فیلدهای جستجو */
.search-input {
  position: relative;
}

.search-input-field {
  padding-right: 40px;
}

.search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  z-index: 10;
}

/* استایل برای وضعیت فعال */
.active-status {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-active {
  background-color: #198754;
}

.status-inactive {
  background-color: #dc3545;
}

/* استایل برای ستون‌ها */
.code-column {
  min-width: 100px;
  text-align: center;
}

.name-column {
  min-width: 200px;
}

.status-column {
  min-width: 80px;
  text-align: center;
}

/* استایل برای صفحه‌بندی */
.pagination-input {
  width: 60px !important;
  display: inline-block !important;
}
.btn-micro {
  padding: 0.15rem 0.35rem;
  font-size: 0.7rem;
  line-height: 1.2;
  border-radius: 0.2rem;
  margin: 0 1px;
}

.btn-micro i {
  font-size: 0.7rem;
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-group-micro {
  gap: 1px;
}

.badge-status {
  padding: 0.2rem 0.4rem;
  font-size: 0.7rem;
  font-weight: normal;
}

.weight-badge {
  background-color: #e3f2fd;
  color: #1565c0;
  padding: 0.2rem 0.4rem;
  border-radius: 0.2rem;
  font-size: 0.75rem;
}

/* استایل‌های اختصاصی برای شبیه‌سازی Kendo UI */
.grid-container {
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 1rem;
}
.k-grouping-header {
  background-color: #f5f5f5;
  padding: 6px 10px;
  border-bottom: 1px solid #ddd;
  font-size: 0.85rem;
  color: #666;
}
.k-grid-header {
  background-color: #e9e9e9;
  border-bottom: 2px solid #ccc;
  padding-left: 0px !important;
}
.k-grid-header table {
  width: 100%;
  border-collapse: collapse;
}
.k-grid-header th {
  padding: 8px 6px;
  font-weight: 600;
  font-size: 0.8rem;
  border-left: 1px solid #ddd;
  text-align: center;
  background-color: #e9e9e9;
}
.k-grid-header th:last-child {
  border-left: none;
}
.k-grid-content {
  background-color: #fff;
}
.k-grid-content table {
  width: 100%;
  border-collapse: collapse;
}
.k-grid-content td {
  padding: 6px 4px;
  border-bottom: 1px solid #eee;
  font-size: 0.8rem;
  text-align: center;
}
.k-grid-content tr:last-child td {
  border-bottom: none;
}
.k-pager-wrap {
  background-color: #f5f5f5;
  padding: 6px 10px;
  border-top: 1px solid #ddd;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}
.k-link {
  color: #337ab7;
  text-decoration: none;
  padding: 3px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background-color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.k-link.k-state-disabled {
  color: #aaa;
  pointer-events: none;
  border-color: #ddd;
  background-color: #f5f5f5;
}
.k-pager-numbers {
  display: flex;
  list-style: none;
  margin: 0 4px;
  padding: 0;
  gap: 2px;
}
.k-pager-numbers li span.k-state-selected {
  background-color: #337ab7;
  color: white;
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 600;
}
.k-pager-input {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 5px;
}
.k-pager-input input {
  width: 50px;
  text-align: center;
  padding: 2px;
  border: 1px solid #ddd;
  border-radius: 3px;
}
.k-dropdown {
  display: inline-block;
  border: 1px solid #ddd;
  border-radius: 3px;
  background-color: #fff;
  padding: 2px 4px;
}
.k-dropdown select {
  border: none;
  background: transparent;
  padding: 2px 16px 2px 2px;
  font-size: 0.8rem;
}
.k-pager-refresh {
  margin-right: 5px;
}
.k-pager-info {
  margin-right: auto;
  color: #777;
}
.glyphicon {
  display: inline-block;
  font-family: "Glyphicons Halflings", sans-serif;
  font-size: 0.7rem;
  margin-left: 3px;
}
.btn-micro {
  padding: 0.15rem 0.35rem;
  font-size: 0.7rem;
  line-height: 1.2;
  border-radius: 0.2rem;
  margin: 0 1px;
}

.btn-micro i {
  font-size: 0.7rem;
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-group-micro {
  gap: 1px;
}

/* استایل برای فیلدهای مختصات جغرافیایی */
.coordinate-field {
  font-family: monospace;
  direction: ltr;
  text-align: left;
}
.btn-micro {
  padding: 0.15rem 0.35rem;
  font-size: 0.7rem;
  line-height: 1.2;
  border-radius: 0.2rem;
  margin: 0 1px;
}

.btn-micro i {
  font-size: 0.7rem;
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-group-micro {
  gap: 1px;
}

/* استایل برای فیلدهای جستجو */
.search-input {
  position: relative;
}

.search-input-field {
  padding-right: 40px;
}

.search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  z-index: 10;
}

/* استایل برای وضعیت */
.status-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  white-space: nowrap;
}

.status-active {
  background-color: #198754;
  color: #fff;
}

.status-inactive {
  background-color: #6c757d;
  color: #fff;
}

.status-default {
  background-color: #0dcaf0;
  color: #000;
}

/* استایل برای جدول - جلوگیری از اسکرول افقی */
.table-responsive {
  overflow-x: auto;
  max-width: 100%;
}

.compact-table {
  width: 100%;
  min-width: 1100px;
}

.compact-table th,
.compact-table td {
  padding: 0.3rem 0.4rem;
  font-size: 0.85rem;
  white-space: nowrap;
  vertical-align: middle;
}

/* استایل برای ستون‌ها با عرض ثابت */
.col-row {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
}

.col-actions {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
}

.col-branch {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.col-company {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.col-contract {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}

.col-date {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}

.col-count {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.col-status {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

/* استایل کلی برای جلوگیری از اسکرول‌های ناخواسته */
body {
  overflow-x: hidden;
  max-width: 100vw;
}

.main-container {
  max-width: 100%;
  overflow-x: hidden;
}

/* استایل برای کارت */
.card-header-bg {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

/* استایل برای select2 */
.select2-container {
  width: 100% !important;
}

/* استایل برای صفحه‌بندی */
.pagination-sm .page-link {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* استایل برای جدول در موبایل */
@media (max-width: 768px) {
  .compact-table {
    min-width: 1000px;
  }

  .compact-table th,
  .compact-table td {
    padding: 0.25rem 0.3rem;
    font-size: 0.8rem;
  }

  .col-contract {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
  }

  .col-date {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
  }
}
.btn-micro {
  padding: 0.15rem 0.35rem;
  font-size: 0.7rem;
  line-height: 1.2;
  border-radius: 0.2rem;
  margin: 0 1px;
}

.btn-micro i {
  font-size: 0.7rem;
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-group-micro {
  gap: 1px;
}

/* استایل برای فیلدهای فرم */
.form-row-custom {
  margin-bottom: 0.5rem;
}

/* استایل برای ستون‌های جدول */
.contract-number {
  font-weight: bold;
  color: #0d6efd;
}

.weight-value {
  font-family: monospace;
  text-align: left;
  direction: ltr;
}

.status-verified {
  color: #198754;
}

.status-pending {
  color: #fd7e14;
}

/* استایل برای حالت خالی جدول */
.empty-table-message {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
  font-style: italic;
}
