.records-block {
  background: #f4f2ef;
  padding: 28px 0 60px;
}

.records-element {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.records-element h2 {
  margin: 0 0 22px;
  font-size: 28px;
  font-weight: 900;
  color: #111;
}

.results-table-wrapper {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.dt-container {
  width: 100%;
  font-family: inherit;
}

.dt-layout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.dt-layout-cell {
  display: flex;
  align-items: center;
}

.dt-search label,
.dt-length label {
  font-weight: 700;
  color: #111;
}

.dt-search input,
.dt-length select {
  min-height: 34px;
  border: 1px solid #ccc;
  border-radius: 7px;
  padding: 6px 10px;
  background: #fff;
  outline: none;
}

.dt-search input {
  min-width: 230px;
  margin-left: 8px;
}

.dt-search input:focus,
.dt-length select:focus {
  border-color: #e21b10;
  box-shadow: 0 0 0 3px rgba(226, 27, 16, 0.14);
}

#resultsTable,
.results-table {
  width: 100% !important;
  min-width: 1200px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  font-size: 15px;
}

#resultsTable th,
#resultsTable td,
.results-table th,
.results-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left !important;
}

#resultsTable thead th,
.results-table thead th {
  padding: 15px 16px;
  background: linear-gradient(135deg, #e21b10 0%, #c5150d 48%, #8f100b 100%);
  color: #fff;
  border: 0;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  cursor: pointer;
  user-select: none;
}

#resultsTable thead th:first-child,
.results-table thead th:first-child {
  border-top-left-radius: 12px;
}

#resultsTable thead th:last-child,
.results-table thead th:last-child {
  border-top-right-radius: 12px;
}

#resultsTable thead th.dt-ordering-asc,
#resultsTable thead th.dt-ordering-desc,
.results-table thead th.dt-ordering-asc,
.results-table thead th.dt-ordering-desc {
  background: linear-gradient(135deg, #ff2518 0%, #d71910 45%, #9d1009 100%);
}

#resultsTable tbody td,
.results-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #e7e7e7;
  color: #1f1f1f;
}

#resultsTable tbody tr:nth-child(even) td,
.results-table tbody tr:nth-child(even) td {
  background: #f8f8f8;
}

#resultsTable tbody tr:hover td,
.results-table tbody tr:hover td {
  background: #fff0ee;
}

.dt-info {
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

.dt-paging {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.dt-paging button {
  border: 0 !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  background: #eee !important;
  color: #222 !important;
  font-weight: 700;
  cursor: pointer;
}

.dt-paging button:hover {
  background: linear-gradient(135deg, #e21b10, #9e120b) !important;
  color: #fff !important;
}

.dt-paging button.current {
  background: #111 !important;
  color: #fff !important;
}

.dt-paging button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.results-empty {
  padding: 30px;
  border-radius: 14px;
  background: #fff4f3;
  color: #9e120b;
  font-weight: 800;
  border: 1px solid rgba(226, 27, 16, 0.2);
}

.records-element form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.records-element select,
.records-element button {
  min-height: 34px;
  border-radius: 6px;
}

.records-element select {
  border: 1px solid #ccc;
  padding: 5px 8px;
  background: #fff;
}

.records-element button {
  border: 0;
  padding: 6px 14px;
  background: linear-gradient(135deg, #e21b10, #9e120b);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.records-element button:hover {
  filter: brightness(1.08);
}

@media (max-width: 900px) {
  .records-block {
    padding: 20px 0 45px;
  }

  .records-element {
    border-radius: 14px;
  }

  .records-element h2 {
    font-size: 23px;
    line-height: 1.15;
  }

  .dt-layout-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 18px;
  }

  .dt-layout-cell,
  .dt-length,
  .dt-search {
    width: 100%;
  }

  .dt-length label,
  .dt-search label {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }

  .dt-search input,
  .dt-length select {
    width: 100%;
    min-width: 0;
    height: 40px;
    box-sizing: border-box;
    margin: 0;
  }

  #resultsTable,
.results-table {
  min-width: 900px;
  font-size: 14px;
}

  #resultsTable thead th,
#resultsTable tbody td,
.results-table thead th,
.results-table tbody td {
  padding: 12px 13px;
}
}

@media (max-width: 600px) {
  .records-element {
    margin: 0 8px;
    padding: 16px 10px !important;
  }

  .records-element h2 {
    font-size: 21px;
    margin-bottom: 18px;
  }

  .dt-layout-row {
    gap: 10px;
    margin-bottom: 14px;
  }

  .dt-layout-cell {
    width: 100%;
    justify-content: center;
  }

  .dt-length {
    width: 100%;
  }

  .dt-length label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    font-size: 14px;
    font-weight: 800;
  }

  .dt-length select {
    width: 82px !important;
    height: 36px;
    margin: 0 !important;
    padding: 4px 8px;
  }

  .dt-search {
    width: 100%;
  }

  .dt-search label {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    font-size: 14px;
    font-weight: 800;
    text-align: left;
  }

  .dt-search input {
    width: 100% !important;
    height: 38px;
    min-width: 0;
    margin: 0 !important;
    box-sizing: border-box;
  }

  .results-table-wrapper {
    width: calc(100% + 20px);
    margin-left: -10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

 #resultsTable,
.results-table {
  min-width: 720px;
  font-size: 13px;
}
  #resultsTable thead th,
.results-table thead th {
  padding: 10px 8px;
  font-size: 10px;
}
  #resultsTable tbody td,
.results-table tbody td {
  padding: 10px 8px;
  font-size: 13px;
}
  .dt-info {
    text-align: center;
    font-size: 12px;
  }

  .dt-paging {
    justify-content: center;
    flex-wrap: wrap;
  }

  .dt-search {
    padding: 0 4px;
    box-sizing: border-box;
  }

  .dt-search label {
    padding: 0 4px;
    box-sizing: border-box;
  }

  .dt-search input {
    width: 100% !important;
    box-sizing: border-box;
    padding: 8px 10px !important;
    margin: 0 !important;
  }
}
/* XLSX - zakładki arkuszy */

.results-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.results-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #e21b10, #9e120b);
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.results-tab:hover {
  filter: brightness(1.08);
}

.results-tab.active {
  background: #111;
  color: #fff;
  cursor: default;
}

.results-sheet {
  display: none;
}

.results-sheet.active {
  display: block;
}

@media (max-width: 600px) {
  .results-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 0 4px 10px;
    margin-bottom: 18px;
    -webkit-overflow-scrolling: touch;
  }

  .results-tab {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 13px;
    font-size: 12px;
    white-space: nowrap;
  }
}

