.reporting-data-table-wrap {
  border: 1px solid var(--tblr-border-color);
  border-radius: 0.75rem;
  overflow: auto;
  background: var(--tblr-bg-surface);
}

.reporting-data-table {
  margin: 0;
}

.reporting-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f2f8fc;
  border-bottom: 1px solid #d7e8f3;
  white-space: nowrap;
}

.reporting-data-table .reporting-data-sort {
  color: #2f5166;
  font-weight: 600;
  text-decoration: none;
}

.reporting-data-table .reporting-data-sort:hover,
.reporting-data-table .reporting-data-sort:focus {
  color: #1f3d4f;
  text-decoration: none;
}

.reporting-data-table .reporting-sort-indicator {
  font-size: 0.9em;
}

.reporting-data-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.reporting-data-table tbody tr:hover {
  background: #f3f9fd;
}

.reporting-data-table .reporting-data-chip {
  background: #e9f1f7;
  color: #2f5166;
  border: 1px solid #d0e1ed;
  border-radius: 999px;
  padding: 0.3rem 0.5rem;
  font-weight: 500;
}

.reporting-data-table .reporting-data-chip--success {
  background: #e4f4e8;
  color: #24593a;
  border-color: #c4e7cc;
}

.reporting-data-table .reporting-data-chip--danger {
  background: #f9e8e4;
  color: #7b3a31;
  border-color: #efcbc4;
}

.reporting-data-table .reporting-data-chip--warning {
  background: #fdf2db;
  color: #7b5a1f;
  border-color: #f0dfb2;
}

html[data-bs-theme="dark"] .reporting-data-table-wrap {
  background: #233742;
  border-color: #36515f;
}

html[data-bs-theme="dark"] .reporting-data-table thead th {
  background: #2a4553;
  border-bottom-color: #3a5c6d;
}

html[data-bs-theme="dark"] .reporting-data-table .reporting-data-sort {
  color: var(--app-dark-text);
}

html[data-bs-theme="dark"] .reporting-data-table tbody tr:nth-child(even) {
  background: #243a46;
}

html[data-bs-theme="dark"] .reporting-data-table tbody tr:hover {
  background: #2a4351;
}

html[data-bs-theme="dark"] .reporting-data-table .reporting-data-chip {
  background: var(--app-dark-border);
  color: var(--app-dark-text);
  border-color: var(--app-dark-border-soft);
}

html[data-bs-theme="dark"] .reporting-data-table .reporting-data-chip--success {
  background: #2f5442;
  color: #d6f0df;
  border-color: #3f6953;
}

html[data-bs-theme="dark"] .reporting-data-table .reporting-data-chip--danger {
  background: #5a3f3a;
  color: #f5dfda;
  border-color: #6f4e47;
}

html[data-bs-theme="dark"] .reporting-data-table .reporting-data-chip--warning {
  background: #5f4d2f;
  color: #f7e8c6;
  border-color: #74603d;
}

@media (max-width: 767px) {
  .workflow-directory-toggle {
    align-self: flex-start;
    max-width: 100%;
  }

  .directory-display-mode-picker__label {
    display: none;
  }

  .directory-display-mode-picker__option {
    padding-inline: 0.7rem;
  }

  .workflow-directory-filter-group--toggle {
    justify-content: flex-start;
  }

  .workflow-directory-filter-group--sort {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .workflow-directory-sort-form {
    min-width: 0;
  }

  .teams-directory-toolbar-row,
  .teams-directory-toolbar-main,
  .teams-directory-toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .teams-directory-view-form {
    display: none;
  }

  .users-directory-card-top {
    flex-direction: column;
  }

  .users-directory-sort-actions {
    border-radius: 1rem;
  }

  .reporting-view-switcher .reporting-graph-pair {
    grid-template-columns: 1fr;
  }

  .reporting-page .reporting-filters-row > [class*="col-"] {
    width: 100%;
  }

  .reporting-page .reporting-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .reporting-page .reporting-filter-label {
    width: auto;
    flex: 0 0 auto;
  }

  .reporting-page .reporting-filter-row--date .reporting-filter-field {
    width: 100%;
  }

  .reporting-page .reporting-filter-field {
    width: 100%;
  }

  .reporting-view-switcher .reporting-card-options-select {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .users-directory-toolbar .reporting-filters-row > [class*="col-"] {
    width: 100%;
  }

  .users-directory-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .users-directory-filter-pills,
  .users-directory-sort-actions {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .reporting-page .reporting-filters-row--wrapped .reporting-filter-label {
    width: 8rem;
    flex: 0 0 8rem;
  }
}

@media (max-width: 1199px) {
  .user-detail-page .user-detail-actions-wrapper {
    position: static;
    top: auto;
  }
}
