/* Help: compact toggle + collapsible panel (top of page) */
.tmt-help-wrapper {
  margin-bottom: 0.6rem;
  padding: 0.35rem 0;
}

.tmt-help-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #555;
  cursor: pointer;
}

.tmt-help-toggle:hover {
  background: #f5f5f5;
  border-color: #999;
}

.tmt-help-toggle-chevron {
  font-size: 0.65rem;
  opacity: 0.8;
}

.tmt-help-panel {
  margin-top: 0.4rem;
  padding: 0.5rem 0;
}

.tmt-help-panel[hidden] {
  display: none;
}

.tmt-help-content {
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #475569;
}

.tmt-help-content p:first-child {
  margin-top: 0;
}

.tmt-help-content p:last-child {
  margin-bottom: 0;
}

/* Filters wrapper: compact toggle + collapsible panel */
.tmt-filters-wrapper {
  margin-bottom: 0.6rem;
  padding: 0.35rem 0;
}

.tmt-filters-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #555;
  cursor: pointer;
}

.tmt-filters-toggle:hover {
  background: #f5f5f5;
  border-color: #999;
}

.tmt-filters-toggle-chevron {
  font-size: 0.65rem;
  opacity: 0.8;
}

.tmt-filter-panel {
  margin-top: 0.4rem;
  padding: 0.5rem 0;
}

.tmt-filter-panel[hidden] {
  display: none;
}

.tmt-filters {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f5f5f5;
  border-radius: 6px;
}

.tmt-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.tmt-filter-row label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

.tmt-filter-submit {
  padding: 0.5rem 1rem;
  background: #8b0000;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.tmt-filter-submit:hover {
  background: #a00000;
}

/* Advanced filter UI */
.tmt-filters-advanced .tmt-filter-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tmt-filters-advanced .tmt-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.tmt-filters-advanced .tmt-filter-row-tpl {
  display: none;
}

.tmt-filters-advanced .tmt-filter-field {
  min-width: 180px;
  padding: 0.4rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.tmt-filters-advanced .tmt-filter-value-wrap {
  flex: 1;
  min-width: 140px;
}

.tmt-filters-advanced .tmt-filter-value-wrap input,
.tmt-filters-advanced .tmt-filter-value-wrap select {
  width: 100%;
  max-width: 220px;
  padding: 0.4rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.tmt-filters-advanced .tmt-remove-filter {
  padding: 0.35rem 0.6rem;
  background: #ddd;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.tmt-filters-advanced .tmt-remove-filter:hover {
  background: #ccc;
}

.tmt-filter-actions {
  margin-bottom: 0.75rem;
}

.tmt-add-filter {
  padding: 0.5rem 0.75rem;
  background: #0000ff;
  border: 1px dashed #888;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
}

.tmt-add-filter:hover {
  background: #f5f5f5;
  border-color: #555;
}

.tmt-filter-sort-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid #e0e0e0;
}

.tmt-filter-sort-row .tmt-sort-select {
  padding: 0.4rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 160px;
}

.tmt-profiles-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  overflow: hidden;
}

.tmt-profiles-table th,
.tmt-profiles-table td {
  padding: 0.6rem 0.8rem;
  border: 1px solid #e2e8f0;
}

.tmt-profiles-table thead th {
  background: #f1f5f9;
  font-weight: 600;
  color: #334155;
}

/* Alternating column background (odd columns slightly tinted) */
.tmt-profiles-table th:nth-child(odd),
.tmt-profiles-table td:nth-child(odd) {
  background: #fafbfc;
}

.tmt-profiles-table th:nth-child(even),
.tmt-profiles-table td:nth-child(even) {
  background: #fff;
}

.tmt-profiles-table thead th:nth-child(odd) {
  background: #eef2f7;
}

.tmt-profiles-table thead th:nth-child(even) {
  background: #f1f5f9;
}

/* Details row: single full-width cell, no column stripe */
.tmt-profiles-table .tmt-profile-details-row td {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0;
}

.tmt-profile-toggle {
  background: none;
  border: none;
  color: #0073aa;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-align: left;
}

.tmt-profile-toggle:hover {
  text-decoration: underline;
}

.tmt-profile-details p {
  margin: 0.25rem 0;
}

.tmt-profile-details p {
  margin: 0.25rem 0;
}

.tmt-pagination ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  padding: 0;
}

.tmt-column-picker {
  margin: 0 0 0.6rem 0;
  padding: 0.35rem 0;
}

.tmt-column-picker-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #555;
  cursor: pointer;
}

.tmt-column-picker-toggle:hover {
  background: #f5f5f5;
  border-color: #999;
}

.tmt-column-picker-chevron {
  font-size: 0.65rem;
  opacity: 0.8;
}

.tmt-column-picker-list {
  margin-top: 0.4rem;
  padding: 0.4rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border-top: 1px solid #eee;
}

.tmt-column-picker-list[hidden] {
  display: none;
}

.tmt-column-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.35rem;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  font-size: 0.78rem;
}

.tmt-column-pill-fixed {
  opacity: 0.7;
}