/* Сброс inline стилей */
table[style],
table[style] td[style],
table[style] th[style],
table[style] tr[style] {
  width: auto !important;
  height: auto !important;
}

.table-fluid {
  width: 100% !important;
  max-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

/* КОНТЕЙНЕР */
.table-scroll-container {
  position: relative;
  margin-bottom: 1rem;
}

/* ВЕРХНИЙ СКРОЛЛ */
.table-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #0d6efd #f1f1f1;
}

.table-scroll-top::-webkit-scrollbar {
  height: 12px;
}

.table-scroll-top::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

.table-scroll-top::-webkit-scrollbar-thumb {
  background: #0d6efd;
  border-radius: 5px;
}

.table-scroll-top::-webkit-scrollbar-thumb:hover {
  background: #0b5ed7;
}

.table-scroll-top-content {
  height: 10px;
}

/* WRAPPER */
.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 4px;
}

.table-scroll-wrapper {
  scrollbar-width: thin;
  scrollbar-color: #0d6efd #f1f1f1;
}

.table-scroll-wrapper::-webkit-scrollbar {
  height: 12px;
}

.table-scroll-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb {
  background: #0d6efd;
  border-radius: 5px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: #0b5ed7;
}

/* ТЕНИ */
.scroll-shadows {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 12px;
  pointer-events: none;
  z-index: 1;
  transition: box-shadow 0.3s;
}

.scroll-shadows.has-scroll-left {
  box-shadow: inset 10px 0 8px -8px rgba(0,0,0,0.3);
}

.scroll-shadows.has-scroll-right {
  box-shadow: inset -10px 0 8px -8px rgba(0,0,0,0.3);
}

.scroll-shadows.has-scroll-left.has-scroll-right {
  box-shadow: 
    inset 10px 0 8px -8px rgba(0,0,0,0.3),
    inset -10px 0 8px -8px rgba(0,0,0,0.3);
}

/* Ячейки */
.table-fluid td,
.table-fluid th {
  padding: 0.75rem !important;
  vertical-align: middle !important;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.table-fluid p {
  margin: 0 !important;
}

.table-fluid:not(:has(thead)):not(:has(th)) tbody tr:first-child td {
  font-weight: 600;
}

@media (max-width: 768px) {
  .table-fluid td,
  .table-fluid th {
    padding: 0.25rem !important;
    font-size: 0.875rem;
  }
}

/* ПЛАВАЮЩИЙ СКРОЛЛ (только на ПК, совпадает с wrapper по ширине и позиции) */
.table-scroll-floating {
  position: fixed;
  bottom: 0;
  z-index: 1000;
  overflow-x: auto;
  overflow-y: hidden;
  background: white;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  display: none;
  scrollbar-width: thin;
  scrollbar-color: #0d6efd #f1f1f1;
}

.table-scroll-floating::-webkit-scrollbar {
  height: 12px;
}

.table-scroll-floating::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.table-scroll-floating::-webkit-scrollbar-thumb {
  background: #0d6efd;
  border-radius: 5px;
}

.table-scroll-floating::-webkit-scrollbar-thumb:hover {
  background: #0b5ed7;
}

.table-scroll-floating-content {
  height: 10px;
}