/* ==================================================================
   ТАБЛИЦЫ (ОБЩИЕ)
   ================================================================== */
table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid #dee2e6;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #dee2e6;
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

.table tbody + tbody {
  border-top: 2px solid #dee2e6;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.table-bordered {
  border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid #dee2e6;
}

.table-bordered thead th,
.table-bordered thead td {
  border-bottom-width: 2px;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

.table-sm th,
.table-sm td {
  padding: 0.3rem;
}

.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==================================================================
   ТАБЛИЦА ПРАЙС-ЛИСТА
   ================================================================== */
.price-table {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.price-table thead {
  background: linear-gradient(135deg, #0d6efd 0%, #1d8ce0 100%);
  color: white;
}

.price-table thead th {
  border: none;
  padding: 1rem;
  font-weight: 600;
}

.price-table tbody tr {
  transition: background-color 0.3s ease;
}

.price-table tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

.price-table tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.price-table tbody tr:last-child td {
  border-bottom: none;
}

/* ==================================================================
   ТАБЛИЦА ЗАКУПОК
   ================================================================== */
.procurements-table th {
  background-color: #e7f3fd;
  color: #0a58ca;
  font-weight: 600;
}

.procurements-table tbody tr {
  cursor: pointer;
  transition: all 0.3s ease;
}

.procurements-table tbody tr:hover {
  background-color: #f8f9fa;
  transform: translateX(5px);
}

/* ==================================================================
   ТАБЛИЦА ДОКУМЕНТОВ
   ================================================================== */
.documents-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

.documents-table .document-name {
  font-weight: 500;
  color: #0d6efd;
}

.documents-table .document-actions {
  display: flex;
  gap: 0.5rem;
}

.documents-table .action-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e7f3fd;
  color: #0d6efd;
  border: none;
  transition: all 0.3s ease;
}

.documents-table .action-btn:hover {
  background: #0d6efd;
  color: white;
}

/* ==================================================================
   ТАБЛИЦА СТАТИСТИКИ
   ================================================================== */
.stats-table {
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.stats-table th {
  background: #f8f9fa;
  color: #495057;
  font-weight: 600;
  padding: 1rem;
  border-bottom: 2px solid #dee2e6;
}

.stats-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e9ecef;
}

.stats-table tr:last-child td {
  border-bottom: none;
}

.stats-table .progress {
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.stats-table .progress-bar {
  background-color: #0d6efd;
  border-radius: 4px;
}

/* ==================================================================
   АДАПТИВНОСТЬ ТАБЛИЦ
   ================================================================== */
@media (max-width: 768px) {
  .table-responsive-sm {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table thead {
    display: none;
  }
  
  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }
  
  .table tr {
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
  }
  
  .table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
    border-bottom: 1px solid #dee2e6;
  }
  
  .table td:before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 50%;
    padding-left: 1rem;
    font-weight: 600;
    text-align: left;
    color: #495057;
  }
  
  .table td:last-child {
    border-bottom: none;
  }
}