.cth-container {
  padding: 16px;
}

// ── Filter bar ────────────────────────────────────────────────────────────

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.filter-field {
  width: 160px;

  ::ng-deep .mat-mdc-form-field-subscript-wrapper {
    display: none; // suppress hint/error space
  }
}

.filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
}

// ── Table header ──────────────────────────────────────────────────────────

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tenant-chip {
  font-size: 11px;
  font-weight: 700;
  background: #e3f2fd;
  color: #1565c0;
  padding: 2px 8px;
  border-radius: 12px;
}

// ── Data table ────────────────────────────────────────────────────────────

.cth-table {
  width: 100%;
  border-collapse: collapse;

  th {
    background: #fafafa;
    font-weight: 600;
    font-size: 12px;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
    color: #555;
    white-space: nowrap;
  }

  td {
    padding: 9px 12px;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
  }

  .cth-row:hover {
    background: #f5f5f5;
  }

  .col-tenant {
    font-weight: 600;
    color: #1976d2;
  }

  .col-job {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .col-error {
    max-width: 240px;
  }
}

// ── Status badges ─────────────────────────────────────────────────────────

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;

  &.status-completed { background: #e8f5e9; color: #2e7d32; }
  &.status-running   { background: #e3f2fd; color: #1565c0; }
  &.status-failed    { background: #ffebee; color: #c62828; }
  &.status-dlq       { background: #fff3e0; color: #e65100; }
}

.error-text {
  color: #b71c1c;
  font-size: 12px;
}

.zero {
  color: #bbb;
}

// ── Pagination ────────────────────────────────────────────────────────────

.pagination-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 8px 0 0;
}

.page-info {
  font-size: 12px;
  color: #666;
}

.page-actions {
  display: flex;
  gap: 4px;
}

// ── Empty / access denied ─────────────────────────────────────────────────

.empty-state {
  text-align: center;
  color: #9e9e9e;
  padding: 48px;
  font-size: 14px;
}

.access-denied {
  text-align: center;
  padding: 64px;
  color: #9e9e9e;

  mat-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
  }
}
