.wpt-table-wrap {
  width: 100%;
  overflow: hidden;
}

.wpt-table-title {
  margin-bottom: 16px;
}

.wpt-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}

.wpt-controls input,
.wpt-controls select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
}

.wpt-fullscreen-btn {
  padding: 10px 14px;
  border: 1px solid #111827;
  background: #111827;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.wpt-table-container {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.wpt-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

.wpt-table th,
.wpt-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  vertical-align: top;
}

.wpt-table th {
  background: #f8fafc;
  font-weight: 600;
  cursor: pointer;
  position: sticky;
  top: 0;
}

.wpt-table tbody tr:nth-child(even) {
  background: #fcfcfd;
}

.wpt-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.wpt-page-btn {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.wpt-page-btn.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.wpt-empty {
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  border-radius: 8px;
}

.wpt-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 99999;
}

.wpt-modal.is-open {
  display: block;
}

.wpt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.wpt-modal-dialog {
  position: relative;
  z-index: 2;
  width: min(96vw, 1600px);
  height: 92vh;
  margin: 4vh auto;
  background: #fff;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wpt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e5e7eb;
}

.wpt-modal-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.wpt-modal-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  background: #fff;
}

.wpt-modal-table-container {
  overflow: auto;
  max-height: 100%;
}

body.wpt-modal-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .wpt-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .wpt-controls {
    grid-template-columns: 1fr;
  }

  .wpt-modal-dialog {
    width: 98vw;
    height: 95vh;
    margin: 2.5vh auto;
  }
}
