.tss-wrap {
  padding: 18px;
  background: #f8fafc;
  color: #0f172a;
}

.tss-head {
  margin-bottom: 12px;
}

.tss-head h2 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
}

.tss-sub {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

.tss-toolbar,
.tss-tableWrap,
.tss-modalCard,
.tss-status,
.tss-stats {
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.tss-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
}

.tss-field {
  min-width: 160px;
  flex: 1 1 180px;
}

.tss-field-range {
  flex: 1.35 1 320px;
}

.tss-label {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.tss-field input,
.tss-filterSearch,
.tss-filterRange input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tss-field input::placeholder,
.tss-filterSearch::placeholder {
  color: #64748b;
}

.tss-field input:focus,
.tss-filterSearch:focus,
.tss-filterRange input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.tss-rangeRow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.tss-rangeSep {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
}

.tss-actions,
.tss-modalActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tss-actions {
  margin-left: auto;
}

.tss-btn,
.tss-filterMiniBtn,
.tss-modalClose {
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #dbe4ee;
  background: #ffffff;
  color: #000000;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.tss-btn:hover,
.tss-filterMiniBtn:hover,
.tss-modalClose:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.tss-btn-primary {
  background: #dcfce7;
  border-color: #86efac;
}

.tss-btn-secondary,
.tss-filterMiniBtn {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.tss-status {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: #ffffff;
}

.tss-status.is-hidden {
  display: none;
}

.tss-statusHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #334155;
}

.tss-statusTrack {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.tss-statusBar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #86efac 0%, #22c55e 50%, #38bdf8 100%);
  background-size: 200% 100%;
  transition: width 0.28s ease;
  animation: tss-progress-shift 1.4s linear infinite;
}

@keyframes tss-progress-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.tss-tableWrap {
  overflow: auto;
  max-height: 72vh;
  border-radius: 18px;
  background: #ffffff;
}

.tss-stats {
  margin-top: 12px;
  border-radius: 18px;
  background: #ffffff;
  padding: 12px;
}

.tss-statsHead {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
}

.tss-statsGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 8px;
}

.tss-statCard {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
}

.tss-statLabel {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.tss-statValue {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
}

.tss-statsLists {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px;
}

.tss-statsListCard {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
}

.tss-statsListTitle {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.tss-statsList {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #0f172a;
}

.tss-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  color: #0f172a;
}

.tss-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0;
  text-align: left;
  background: #f1f5f9;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #dbe4ee;
  white-space: nowrap;
}

.tss-table thead th:last-child {
  border-right: 0;
}

.tss-thBtn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #000000;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tss-thBtn:hover {
  background: #ecfdf5;
}

.tss-thText {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tss-thIcon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
}

.tss-thActive .tss-thIcon {
  background: #bbf7d0;
  color: #166534;
}

.tss-table tbody td {
  padding: 11px 12px;
  border-right: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.tss-table tbody td:last-child {
  border-right: 0;
}

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

.tss-table tbody tr:hover {
  background: #f0fdf4;
}

.tss-table tbody tr.tss-noData td {
  text-align: center;
  color: #64748b;
  padding: 22px 12px;
}

.tss-table tbody td.tss-cell-red {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
}

.tss-table tbody td.tss-cell-green {
  background: #dcfce7;
  color: #166534;
  font-weight: 700;
}

.tss-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  background: rgba(241, 245, 249, 0.72);
  backdrop-filter: blur(3px);
}

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

.tss-modalCard {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 520px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 32px);
  transform: translate(-50%, -50%);
  border-radius: 18px;
  background: #ffffff;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.tss-columnsCard {
  width: 460px;
}

.tss-modalHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.tss-modalEyebrow {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tss-modalTitle {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.tss-modalClose {
  width: 38px;
  min-width: 38px;
}

.tss-modalBody {
  overflow: auto;
}

.tss-filterTop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.tss-filterColorOpt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  background: #ffffff;
  font-size: 12px;
  color: #0f172a;
}

.tss-colorSwatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.tss-colorSwatch-red {
  background: #ef4444;
}

.tss-colorSwatch-green {
  background: #22c55e;
}

.tss-filterRange {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tss-filterRange label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.tss-filterList,
.tss-columnsList {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
}

.tss-filterList {
  max-height: 52vh;
  padding: 6px;
}

.tss-filterSectionTitle {
  margin: 12px 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tss-filterItem,
.tss-columnItem {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #0f172a;
}

.tss-filterItem:hover,
.tss-columnItem:hover {
  background: #f8fafc;
}

.tss-filterItem input,
.tss-columnItem input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.tss-filterItem span,
.tss-columnItem span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tss-columnsList {
  max-height: 55vh;
  padding: 8px;
}

.tss-hiddenCol {
  display: none;
}

@media (max-width: 960px) {
  .tss-toolbar {
    align-items: stretch;
  }

  .tss-field,
  .tss-field-range,
  .tss-actions {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .tss-btn {
    flex: 1 1 calc(33.333% - 6px);
  }

  .tss-rangeRow,
  .tss-filterRange {
    grid-template-columns: 1fr;
  }

  .tss-statsGrid,
  .tss-statsLists {
    grid-template-columns: 1fr;
  }

  .tss-rangeSep {
    display: none;
  }
}
