/* ===== TABLE CONTAINER ===== */
.table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow-x: auto;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== TABLE ===== */
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 1000px;
}

thead {
  background-color: #f8fafc;
}

th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #f8fafc;
  /* inset shadow замість border для sticky-елементів */
  box-shadow: inset 0 -2px 0 0 #e2e8f0;
  padding: 16px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

th a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

th a:hover {
  color: #0f172a;
}

td {
  padding: 16px;
  font-size: 14px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

tbody tr {
  transition: background-color 0.15s ease;
}

tbody tr:hover {
  background-color: #f8fafc;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ===== INLINE FILTER ROW ===== */
tr.filter-row th {
  position: sticky;
  top: 49px; /* висота першого рядка заголовка */
  z-index: 10;
  background-color: #f0f4f8;
  box-shadow: inset 0 -2px 0 0 #cbd5e1;
  padding: 6px 8px;
}

.th-filter {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  background: white;
  color: #374151;
  outline: none;
  transition: border-color 0.15s;
}

.th-filter:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

input[type="date"].th-filter {
  padding: 3px 4px;
  font-size: 11px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .table-container {
    max-height: calc(100vh - 150px);
    border-radius: 8px;
  }

  th {
    padding: 12px 10px;
  }
  
  td {
    padding: 12px 10px;
  }
}
